import "package:ct_pa_majordomo/config/theme_vars.dart";
import "package:ct_pa_majordomo/pages/widgets/menu_block.dart";
import "package:ct_pa_majordomo/router/keys.dart";
import "package:ct_pa_majordomo/utils/stacker.dart";
import "package:ct_pa_majordomo/widgets/normal_scaffold/index.dart";
import 'package:flutter/material.dart';

class ApartmentManage extends StatefulWidget {
  const ApartmentManage({Key? key}) : super(key: key);

  @override
  State<ApartmentManage> createState() => _ApartmentManageState();
}

class _ApartmentManageState extends State<ApartmentManage> {
  @override
  Widget build(BuildContext context) {
    return NormalScaffold(
      title: "公寓管理",
      child: Padding(
        padding: EdgeInsets.all(ThemeVars.paddingPage),
        child: Column(
            children: [
              MenuBlock(
                items: [
                  MenuBlockItem(
                      text: "公寓",
                      onTap: () {
                        Stacker.pushNamed(Keys.APARTMENT_SETTING);
                      }
                  ),
                ],
              ),
              const SizedBox(height: 12,),
              MenuBlock(
                items: [
                  MenuBlockItem(
                      text: "门锁设置",
                      onTap: () {
                        Stacker.pushNamed(Keys.APARTMENT_LOCK_SETTING);
                      }
                  ),
                  MenuBlockItem(
                      text: "房间设置",
                      onTap: () {
                        Stacker.pushNamed(Keys.APARTMENT_ROOM_SETTING);
                      }
                  ),
                  MenuBlockItem(
                      text: "水电设置",
                      onTap: () {
                        Stacker.pushNamed(Keys.WATER_ELECTRICITY_SETTING);
                      }
                  ),
                ],
              ),
            ]
        ),
      )
    );
  }
}

